package cn.bgs.pojo.VoAll;


import java.math.BigDecimal;
import java.util.Date;

public class GoodsVo {

    private Integer pkId;               //主键id
    private String mainCategory;        //主类
    private String subCategory;         //次类别
    private String id;                  //商品id
    private String name;                //商品名称
    private String unit;                //商品规格(单位)
    private BigDecimal price;               //价格
    private Integer store;              //库存
    private String showPicture;         //图片
    private String status;              //状态  0-在线
    private String describe;            //描述
    private String creater;             //创建者
    private String deleteFlag;          //删除标识  0-正常  1-删除
    private String creator;             //创建者/修改者
    private Date createTime;            //创建时间
    private Date updateTime;            //修改时间

    private Integer count;              //购物车商品数量
    private BigDecimal total;           //总金额

    @Override
    public String toString() {
        return "GoodsVo{" +
                "pkId=" + pkId +
                ", mainCategory='" + mainCategory + '\'' +
                ", subCategory='" + subCategory + '\'' +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", unit='" + unit + '\'' +
                ", price=" + price +
                ", store=" + store +
                ", showPicture='" + showPicture + '\'' +
                ", status='" + status + '\'' +
                ", describe='" + describe + '\'' +
                ", creater='" + creater + '\'' +
                ", deleteFlag='" + deleteFlag + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", count=" + count +
                ", total=" + total +
                '}';
    }

    public BigDecimal getTotal() {
        BigDecimal big = new BigDecimal(count);
        BigDecimal multiply = big.multiply(price);

        return multiply;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getPkId() {
        return pkId;
    }

    public void setPkId(Integer pkId) {
        this.pkId = pkId;
    }

    public String getMainCategory() {
        return mainCategory;
    }

    public void setMainCategory(String mainCategory) {
        this.mainCategory = mainCategory;
    }

    public String getSubCategory() {
        return subCategory;
    }

    public void setSubCategory(String subCategory) {
        this.subCategory = subCategory;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getStore() {
        return store;
    }

    public void setStore(Integer store) {
        this.store = store;
    }

    public String getShowPicture() {
        return showPicture;
    }

    public void setShowPicture(String showPicture) {
        this.showPicture = showPicture;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
